#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPushButton>
#include <QFontDialog>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QPushButton* btn = new QPushButton("字体对话框",this);

    connect(btn,&QPushButton::clicked,[=]()
    {
       bool flag;
       QFont font = QFontDialog::getFont(&flag,QFont("华文行楷",36));

    });
}

MainWindow::~MainWindow()
{
    delete ui;
}

